import request from '@/utils/request'
const serviceName = 'System'

export function queryUsers(data) {
  return request({
    url: serviceName + '/User/QueryUser',
    method: 'post',
    data
  })
}

export function getUser(Id) {
  return request({
    url: serviceName + '/User/GetUser?Id=' + Id,
    method: 'get'
  })
}

export function saveUser(data) {
  return request({
    url: serviceName + '/User/SaveUser',
    method: 'post',
    data
  })
}

export function deleteUsers(data) {
  return request({
    url: serviceName + '/User/DeleteUsers',
    method: 'post',
    data
  })
}

export function getRoleByTenant(Id) {
  return request({
    url: serviceName + '/User/GeRoleByTenant?Id=' + Id,
    method: 'get'
  })
}

export function resetPassword(data) {
  return request({
    url: serviceName + '/User/ResetPassword',
    method: 'post',
    data
  })
}
export default {
  queryUsers,
  getUser,
  saveUser,
  deleteUsers,
  getRoleByTenant,
  resetPassword
}
